﻿using System;
using System.Diagnostics;

namespace Smart.CE.Log
{
    /// <summary>
    /// 
    /// </summary>
    public class DebugLogListener : LogListener
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="message"></param>
        public override void Write(string message)
        {
            if( NeedIndent )
            {
                WriteIndent();
            }
            Debug.Write( message );
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="message"></param>
        public override void WriteLine(string message)
        {
            if( NeedIndent )
            {
                this.WriteIndent();
            }
            Debug.WriteLine( message );

            NeedIndent = true;
        }
    }
}
